package com.example.classes;

/**
 * This class represents an administrator account which has the exclusive privilidge to unlock locked
 * user accounts
 * @author Ankit Pasi
 */
public class Admin extends Member{
    /**
     * default constructor for admin
     */
    public Admin(){
    }

    /**
     * constructor with given values
     * @param userName string for the name of the handle
     * @param pass string for the password of the account
     * @param contact string for the contact information
     */
    public Admin(String userName, String pass, String contact)
    {
        super(userName,pass,contact);

    }

    /**
     * Method to unlock a locked user account
     * @param mem Member to unlock
     * @return true of mem provided is a Member object
     */
    public boolean unlockMember(Object mem)
    {
         if (mem instanceof Member)
         {
             Member usr=(Member)mem;
             usr.locked=false;
             return true;
         }
        else return false;
    }
}
